package com.aplink.generic.constant.type;

public enum ColumnType {
    ContextMenu("ContextMenu"),
    DateTime("DateTime"),
    Decimal("Decimal"),
    Drawable("Drawable"),
    Image("Image"),
    Integer("Integer"),
    Money("Money"),
    Text("Text");

    public static ColumnType get(final String value) {
        for (final ColumnType type : ColumnType.values()) {
            if (type.mType.equals(value)) {
                return type;
            }
        }
        return Text;
    }

    private String mType;

    private ColumnType(final String type) {
        setType(type);
    }

    public String getType() {
        return this.mType;
    }

    public void setType(final String type) {
        this.mType = type;
    }
}
